<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2017/12/8
 * Time: 18:53
 * 输出验证码
 */
//启用SESSION
session_start();

//加载验证码类文件
require_once("common/captcha.class.php");

//实例化一个验证码对象
$captcha=new Captcha(60,20,4);

//调用类中方法输出验证码
$captcha->showImg();

//将产生的验证码存储到SESSION变量中
$_SESSION['captchaCode']=$captcha->getCaptcha();

